home *** CD-ROM | disk | FTP | other *** search
/ Interactive Quarterly / The Best of New Machine Publishing 1 - Disc 4: Interactive Quarterly.iso / pc / store.dir / 00168_Print Button.ls < prev    next >
Encoding:
Text File  |  1996-09-26  |  2.3 KB  |  50 lines

  1. on mouseUp
  2.   global orders, payment, cardnumber, expires, birthday
  3.   cursor(4)
  4.   set doc to new(xtra("printomatic_lite"))
  5.   if not objectp(doc) then
  6.     exit
  7.   end if
  8.   if the hilite of member "Check" = 1 then
  9.     set payment to "Check"
  10.     set cardnumber to " "
  11.     set expires to " "
  12.   else
  13.     if the hilite of member "MC" then
  14.       set payment to "MasterCard"
  15.       set cardnumber to the text of member "Card Number"
  16.       set expires to the text of member "Expires"
  17.     else
  18.       if the hilite of member "Visa" then
  19.         set payment to "Visa"
  20.         set cardnumber to the text of member "Card Number"
  21.         set expires to the text of member "Expires"
  22.       else
  23.         if the hilite of member "Discover" then
  24.           set payment to "Discover"
  25.           set cardnumber to the text of member "Card Number"
  26.           set expires to the text of member "Expires"
  27.         end if
  28.       end if
  29.     end if
  30.   end if
  31.   set birthday to the text of member "Birthday"
  32.   set lineCount to count(orders)
  33.   set tmpnum to the number of member "Order Field"
  34.   set CDROMlist to "QUANTITY ___ TITLE ___ PRICE" & RETURN
  35.   repeat with i = 1 to lineCount
  36.     set tmpfield to getAt(orders, i)
  37.     set tmpnum to tmpnum + 1
  38.     set tmpcast to the name of member tmpnum
  39.     set foo to CDROMlist & RETURN & tmpfield
  40.     set CDROMlist to foo
  41.     set tmpquant to tmpquant + getAt(quantlist, i)
  42.     set tmptotal to tmptotal + getAt(totallist, i)
  43.   end repeat
  44.   set foo to RETURN & "TOTAL CD-ROMs: " & string(tmpquant) & ",   " & "TOTAL PRICE: $" & string(tmptotal) & ".00" & RETURN
  45.   set CDROMlist to CDROMlist & RETURN & foo
  46.   append(doc, RETURN & the text of member "Ordering Instructions" & RETURN & RETURN, CDROMlist & RETURN, "Name: ", the text of member "Name" & RETURN, "Address: ", the text of member "Address" & RETURN, "City: ", the text of member "City" & RETURN, "State: ", the text of member "State" & RETURN, "Zip: ", the text of member "Zip" & RETURN, "Country: ", the text of member "Country" & RETURN, "Phone: ", the text of member "Phone" & RETURN, "Fax: ", the text of member "Fax" & RETURN, "Email: ", the text of member "Email" & RETURN & RETURN, "Payment: ", payment & RETURN, "Card #: ", cardnumber & RETURN, "Expiration Date: ", expires & RETURN, "Date Of Birth: ", birthday & RETURN & RETURN, "Signature: _____________________________________")
  47.   print(doc)
  48.   cursor(-1)
  49. end
  50.